package source.model.utility;

import source.model.Position;
import source.events.action.MoveDirection;

public abstract class PositionUtility {
	public static boolean inRange(Position one, Position two, int range){
		if (squaresAway(one, two) <= range) return true;
		return false;
	}
	
	public static int squaresAway(Position one, Position two){
		int x = Math.abs(one.getX() - two.getX());
		int y = Math.abs(one.getY() - two.getY());
		
		return Math.max(x, y);
	}
}
